package com.gz.utils;

/**
 * Created by frank on 2018/12/28.
 */
public class Random {
       public static String getFourRandom(){
        java.util.Random random = new java.util.Random();
        String fourRandom = random.nextInt(10000) + "";
        int randLength = fourRandom.length();
        if(randLength<4){
            for(int i=1; i<=4-randLength; i++) {
                fourRandom = "0" + fourRandom;
            }
        }
        return fourRandom;
    }
}
